package com.yx.changdao.common.data;

/**
 * @Description: <br />
 * 返回响应状态码
 * <p>
 * <br />
 * @Auther: Zhangjiashun
 * @create 2019/11/20 15:47
 */
public enum RespCodeEnum {

    OK(200, "OK"),
    BAD_REQUEST(400, "Bad Request"),
    UNAUTHORIZED(401, "Unauthorized"),

    NO_PERMISSION(402,"No permission"), //无权限

    FORBIDDEN(403, "Forbidden"),
    NOT_FOUND(404, "Not Found"),
    METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
    INTERNAL_SERVER_ERROR(500, "Internal Server Error"),
    ;

    private final int value;

    private final String reasonPhrase;

    public int getValue() {
        return value;
    }

    public String getReasonPhrase() {
        return reasonPhrase;
    }

    RespCodeEnum(int value, String reasonPhrase) {
        this.value = value;
        this.reasonPhrase = reasonPhrase;
    }
}
